package com.deparse.dpframe.common;

import android.os.Message;

/**
 * Created by hsy on 2016/3/2.
 */
public final class DPBusEvent {
    public int what;
    public int[] args;
    public Object obj;

    public Message toMessage() {
        Message msg = Message.obtain();
        msg.what = what;
        if (null != args) {
            if (args.length > 0) {
                msg.arg1 = args[0];
            }
            if (args.length > 1) {
                msg.arg2 = args[1];
            }
        }
        msg.obj = obj;
        return msg;
    }
}
